package test06;

public class Goods {
    private  String gNum;
    private  String gName;
    private double gPrice;

    //getter和setter

    public String getgNum() {
        return gNum;
    }

    public void setgNum(String gNum) {
        this.gNum = gNum;
    }

    public String getgName() {
        return gName;
    }

    public void setgName(String gName) {
        this.gName = gName;
    }

    public double getgPrice() {
        return gPrice;
    }

    public void setgPrice(double gPrice) {
        this.gPrice = gPrice;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "gNum='" + gNum + '\'' +
                ", gName='" + gName + '\'' +
                ", gPrice=" + gPrice +
                '}';
    }

    public  Goods(String gNum,String gName,double gPrice){
        this.gNum = gNum;
        this.gName = gName;
        this.gPrice = gPrice;
    }
}
